package utils

import (
	"math/rand"
	"time"
)

func RandomString(n int) string{
	//生成随机字符串
	//n:随机字符串的长度
	var letters = []byte("asdfghjklzxcvbnmqwertyuiopASDFGHJKLZXCVBNMQWERTYUIOP")
	result := make([]byte, n)

	rand.Seed(time.Now().Unix())
	for i:= range result{
		result[i] =letters[rand.Intn(len(letters))]
	}

	return string(result)
}